<h1>Listing itineraries</h1>

<table>
  <tr>
    <th>Iti location</th>
    <th>Iti start date</th>
    <th>Iti end date</th>
    <th>Iti votes</th>
    <th>Iti latitude</th>
    <th>Iti longitude</th>
    <th>Trip</th>
    <th>Iti status</th>
	<th>Iti description</th>
	<th>Iti creador</th>
  </tr>

<% @itineraries.each do |itinerary| %>
  <tr>
    <td><%=h itinerary.iti_location %></td>
    <td><%=h itinerary.iti_start_date %></td>
    <td><%=h itinerary.iti_end_date %></td>
	<td><%=h itinerary.iti_image_url %></td>
    <td><%=h itinerary.iti_votes %></td>
    <td><%=h itinerary.iti_latitude %></td>
    <td><%=h itinerary.iti_longitude %></td>
    <td><%=h itinerary.trip_id %></td>
    <td><%=h itinerary.iti_status %></td>
    <td><%=h itinerary.iti_description %></td>
	<td><%=h itinerary.user_id %></td>
    <td><%= link_to 'Show', itinerary %></td>
    <td><%= link_to 'Edit', edit_itinerary_path(itinerary) %></td>
    <td><%= link_to 'Destroy', itinerary, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New itinerary', new_itinerary_path %>